package org.example.lottery_system;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.crypto.symmetric.AES;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.nio.charset.StandardCharsets;
@SpringBootTest
public class HashTEst {
    @Test
    void test(){
        String s = DigestUtil.sha256Hex("123456");
        System.out.println(s);
        byte[] bytes = "123456789abcdefg".getBytes(StandardCharsets.UTF_8);
        AES aes = SecureUtil.aes(bytes);
        String s1 = aes.encryptHex("13056805566");
        System.out.println(s1);
    }
}
